package com.unipock.pay.vo.auth;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.ForeignKey;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * 角色权限
 * 
 * @author Administrator
 *
 */
@Entity
@Table(name = "t_role_node")
public class RoleNode {

	@Id
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid2")
	@Column(name = "role_node_id", length = 36)
	public String id;

	@ManyToOne(targetEntity = Role.class, cascade = {})
	@JoinColumn(name = "role_id", foreignKey = @ForeignKey(name = "none"))
	@JsonIgnore
	public Role role;

	@Column(name = "node_id", length = 255)
	public String nodeId;
}
